<!DOCTYPE html>
<html lang="en">
<head>
    <style>
        span{
            display: none;
        }
    </style>
</head>

<body>
<button class="click">dia</button>
<input type="checkbox" class="box">
<span class="a">sss</span>
<div id="tab7" class="tab_content house-apply" style="display: none;">
    <h4>看房管理</h4>
    <ul class="applyToSee">
        <li class="item clearfix">
            <div class="left fl">
                <img src="images/houseMess.png" alt="">
                <p>房租预算 <strong class="orange">5000-10000</strong></p>
                <p>地理位置：<span>洪山区</span></p>
                <p class="contactNum">联系电话：<span>13344455566</span></p>
            </div>
            <div class="right fl">
                <h5>评论<ul class="comment clearfix">
                    <li>☆</li>
                    <li>☆</li>
                    <li>☆</li>
                    <li>☆</li>
                    <li>☆</li>
                </ul></h5>
                <div class="pic-upload-wrap"><span>上传图片</span><input name="picture" type="file" value="上传图片"></div>
                <textarea name="comment-text" id="comment-text" cols="60" rows="5"></textarea><br>
                <input class="submit" type="submit" value="确认评价">
            </div>

        </li>
        <li class="item clearfix">
            <div class="left fl">
                <img src="images/houseMess.png" alt="">
                <p>房租预算 <strong class="orange">5000-10000</strong></p>
                <p>地理位置：<span>洪山区</span></p>
                <p class="contactNum">联系电话：<span>13344455566</span></p>
            </div>
            <div class="right fl">
                <h5>评论<ul class="comment clearfix">
                    <li>☆</li>
                    <li>☆</li>
                    <li>☆</li>
                    <li>☆</li>
                    <li>☆</li>
                </ul></h5>
                <div class="pic-upload-wrap"><span>上传图片</span><input name="picture" type="file" value="上传图片"></div>
                <textarea name="comment-text" id="comment-text" cols="60" rows="5"></textarea><br>
                <input class="submit" type="submit" value="确认评价">
            </div>

        </li>
        <li class="item clearfix">
            <div class="left fl">
                <img src="images/houseMess.png" alt="">
                <p>房租预算 <strong class="orange">5000-10000</strong></p>
                <p>地理位置：<span>洪山区</span></p>
                <p class="contactNum">联系电话：<span>13344455566</span></p>
            </div>
            <div class="right fl">
                <h5>评论<ul class="comment clearfix">
                    <li>☆</li>
                    <li>☆</li>
                    <li>☆</li>
                    <li>☆</li>
                    <li>☆</li>
                </ul></h5>
                <div class="pic-upload-wrap"><span>上传图片</span><input name="picture" type="file" value="上传图片"></div>
                <textarea name="comment-text" id="comment-text" cols="60" rows="5"></textarea><br>
                <input class="submit" type="submit" value="确认评价">
            </div>

        </li>
    </ul>
</div>

</body>
<script src="js/jquery-3.2.1.js"></script>
<script>
    $('.click').click(function () {
        if($('.box').attr('checked') === undefined){
            $('.box').attr('checked','true');
        }else{
            $('.box').removeAttr('checked');
        }


//        $(".a").innerHTML(getNowFormatDate());
        document.querySelector(".a").innerHTML = getNowFormatDate();
        document.querySelector(".a").style.display = "block";
        console.log(getNowFormatDate())

    });
    function getNowFormatDate() {
        var date = new Date();
        var seperator1 = "-";
        var seperator2 = ":";
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
        }
        var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
            + " " + date.getHours() + seperator2 + date.getMinutes()
            + seperator2 + date.getSeconds();
        return currentdate;
    }
</script>
</html>